/**
 * 赛事列表响应
 */
class GameListResp {

    constructor() {
    }

    /**
     * 设置比赛列表
     *
     * @param gameList {[GameResp]}
     * @param version
     */
    setGameList(gameList, version) {
        this.gameList = gameList;
        this.version = version;
    }

    /**
     * 获取比赛列表
     *
     * @return {GameResp[]}
     */
    getGameList() {
        return this.gameList;
    }
}

/**
 * 赛事
 */
class GameResp {

    /**
     * @param groupId       联赛id
     * @param groupNameCn   联赛名称中文名
     * @param groupNameEn   联赛名称英文名
     * @param gameId        比赛id
     * @param gameTime      当前比赛时间
     * @param gameSection   当前赛节：1H-上半场,2H-下半场,HT-半场
     * @param homeTeamCn    主队名称中文名
     * @param homeTeamEn    主队名称英文名
     * @param homeScore     主队得分
     * @param awayTeamCn    客队名称中文名
     * @param awayTeamEn    客队名称英文名
     * @param awayScore     客队得分
     * @param isStop        是否停盘
     * @param oddsList      赔率列表
     * @param startDate     开始时间
     */
    constructor(groupId, groupNameCn, groupNameEn, gameId, gameTime, gameSection, homeTeamCn, homeTeamEn, homeScore, awayTeamCn, awayTeamEn, awayScore, isStop, oddsList, startDate) {
        this.groupId = groupId;
        this.groupNameCn = groupNameCn;
        this.groupNameEn = groupNameEn;
        this.gameId = gameId;
        this.gameTime = gameTime;
        this.gameSection = gameSection;
        this.homeTeamCn = homeTeamCn;
        this.homeTeamEn = homeTeamEn;
        this.homeScore = homeScore;
        this.awayTeamCn = awayTeamCn;
        this.awayTeamEn = awayTeamEn;
        this.awayScore = awayScore;
        this.isStop = isStop;
        this.oddsList = oddsList;
        this.startDate = startDate;
    }

    /**
     * 获取盘口列表
     *
     * @return {*}
     */
    getOddsList() {
        return this.oddsList;
    }
}

/**
 * 赛事盘口详情
 */
class GameOddsResp {

    /**
     * @param section   赛节索引 0-全场，1-上半场
     * @param mode      模式 1-让分，2-大小
     * @param oddsId    赔率id(系统生成的主键)
     * @param odds      赔率
     * @param desc      附加描述
     * @param key       让分: 主/客，大小：大/小
     * @param extra     分值
     * @param betJson   投注所需数据
     */
    constructor(section, mode, oddsId, odds, desc, key, extra, betJson) {
        this.section = section;
        this.mode = mode;
        this.oddsId = oddsId;
        this.odds = odds;
        this.desc = desc;
        this.key = key;
        this.extra = extra;
        this.betJson = betJson;
    }
}

module.exports = {
    GameListResp,
    GameResp,
    GameOddsResp
}